package com.finance.rule.dao;


import com.finance.rule.bean.pojo.NewPieceRule;
import com.finance.rule.bean.pojo.NewRuleList;
import com.finance.rule.bean.pojo.NewWeightRule;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @Author: ly
 * @Date: Created in 2017/8/7
 */
@Component
public interface NewRuleMapper {

    List<NewRuleList> getNewsRuleListPage(@Param("newRule") NewRuleList newRuleList);

    int countRuleList(@Param("newRule") NewRuleList newRuleList);

    int addPiece(NewPieceRule newPieceRule);

    int addWeight(NewWeightRule newWeightRule);

    int updatePiece(NewPieceRule newPieceRule);

    int updateWeight(NewWeightRule newWeightRule);

    List<NewPieceRule> getNewPieceRules(String ruleId);

    List<NewWeightRule> getNewWeightRules(String ruleId);

    int deletePieceRules(String masterRuleId);

    int deletePieceRulesAll();

    int deleteWeightRules(String masterRuleId );

    int deleteWeightRulesAll();

    int bankupPieceRule(@Param("masterRuleId")String masterRuleId,@Param("v")long version);

    int bankupPieceRuleALL(@Param("v")long version);

    int bankupWeightRule(@Param("masterRuleId")String masterRuleId,@Param("v")long version);

    int bankupWeightRuleAll(@Param("v")long version);
}
